import type { StorybookConfig } from "@storybook/react-webpack5";

const config: StorybookConfig = {
	stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
	addons: [
		"@storybook/addon-links",
		"@storybook/addon-essentials",
		"@storybook/addon-onboarding",
		"@storybook/addon-interactions",
	],
	framework: {
		name: "@storybook/react-webpack5",
		options: {},
	},
	docs: {
		autodocs: "tag",
	},
	babel: async (options) => ({
		...options,
		plugins: [],
		presets: [
			["@babel/preset-typescript", { allowDeclareFields: true }],
			["@babel/preset-react", { runtime: "automatic" }],
		],
	}),
};
export default config;
